package com.yinggu.dao;

import com.yinggu.pojo.KDept;
import com.yinggu.utils.DBUtil;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import java.sql.SQLException;
import java.util.List;

public class DeptDao {
    public List<KDept> getDepts() throws SQLException {
        String sql = "SELECT *FROM k_dept";
        return (List<KDept>)DBUtil.query(new BeanListHandler(KDept.class),sql);
    }
}
